<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <xxx></xxx>

    <script>
      // function Person(name) {
      //   this.name = name
      // }

      // Person.prototype.speak = function () {
      //   console.log(this.name)
      // }

      // const p1 = new Person('zs')
      // const p2 = new Person('ls')

      class Person {
        constructor(name) {
          this.name = name
        }

        speak() {
          console.log(this.name)
        }
      }
      const p1 = new Person('zs')
      const p2 = new Person('ls')
      p1.speak()
      p2.speak()
    </script>
  </body>
</html>
